<extend name="Layout/layout"/>
<block name="style">
<style>
.labelwidth{ width:280px; }
.layui-input-block{ margin-left:320px; }
.layui-input-block .layui-input{width:80%;}
.layui-input-block .layui-select-fly{ height: 35px; border-radius: 8px; padding: 0px 5px; border: 1px solid #D2D2D2!important; }
</style>
</block>
<block name="body">
    <div class="main-title">
        <h2>{:isset($info['id'])?'编辑':'新增'}后台菜单</h2>
    </div>
    <form action="{:U()}" method="post" class="form-horizontal">
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">标题<span class="check-tips">（用于后台显示的配置标题）</span></label>
            <div class="layui-input-block">
                <input type="text" class="text input-large layui-input" name="title" value="{$info.title|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">排序<span class="check-tips">（用于分组显示的顺序）</span></label>
            <div class="layui-input-block">
                <input type="text" class="text input-small layui-input" name="sort" value="{$info.sort|default=0}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">链接<span class="check-tips">（U函数解析的URL或者外链）</span></label>
            <div class="layui-input-block">
                <input type="text" class="text input-large layui-input" name="url" value="{$info.url|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">上级菜单<span class="check-tips">（所属的上级菜单）</span></label>
            <div class="layui-input-block">
                <select name="pid" class="layui-select-fly">
                    <volist name="Menus" id="menu">
                        <option <if condition="$info['pid'] eq $menu['id']">selected="selected"</if> value="{$menu.id}">{$menu.title_show}</option>
                    </volist>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">分组<span class="check-tips">（用于左侧分组二级菜单）</span></label>
            <div class="layui-input-block">
                <input type="text" class="text input-large layui-input" name="group" value="{$info.group|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">是否隐藏<span class="check-tips"></span></label>
            <div class="layui-input-block">
                <label class="radio"><input type="radio" <if condition="$info['hide'] eq 1"> checked="checked" </if> name="hide" value="1">是</label>
                <label class="radio"><input type="radio" <if condition="$info['hide'] neq 1"> checked="checked" </if> name="hide" value="0">否</label>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">仅开发者模式可见<span class="check-tips"></span></label>
            <div class="layui-input-block">
                <label class="radio"><input type="radio" <if condition="$info['is_dev'] eq 1"> checked="checked" </if>  name="is_dev" value="1">是</label>
                <label class="radio"><input type="radio" <if condition="$info['is_dev'] neq 1"> checked="checked" </if>  name="is_dev" value="0">否</label>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">说明<span class="check-tips">（菜单详细说明）</span></label>
            <div class="layui-input-block">
                <input type="text" class="text input-large layui-input" name="tip" value="{$info.tip|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="hidden" name="id" value="{$info.id|default=''}">
                <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
                <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        //highlight_subnav('{:U('index')}');
    </script>
</block>